package com.example.servercenter.rest;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author XL
 * @version 0.1
 * @date 2021/8/12 21:40
 */
@RestController
@RequestMapping("/product")
public class ProductResource {

    @GetMapping("")
    public ResponseEntity<String> get(HttpServletRequest request) {
        String token = request.getHeader("token");
        System.out.println("=========== token header: " + token);
        return ResponseEntity.ok("String success........");
    }

}
